package com.cus.tom.transfer.ac;

import android.os.Bundle;

import androidx.annotation.Nullable;

import com.cus.tom.transfer.R;
import com.cus.tom.transfer.databinding.ActListBinding;
import com.cus.tom.transfer.frag.AppFragment;
import com.cus.tom.transfer.frag.AudioFragment;
import com.cus.tom.transfer.frag.ImgFragment;
import com.cus.tom.transfer.frag.VideoFragment;

public class ListAct extends BaseAct {

    ActListBinding binding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActListBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        int i = getIntent().getIntExtra("index", 0);
        switch (i) {
            case 0:
                replaceFragment(R.id.frame, new ImgFragment(0, i));
                break;
            case 1:
                replaceFragment(R.id.frame, new VideoFragment(0, i));
                break;
            case 2:
                replaceFragment(R.id.frame, new AudioFragment(0, i));
                break;
            case 3:
                replaceFragment(R.id.frame, new AppFragment(0, i));
                break;
        }
    }
}
